<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix='c' uri="http://java.sun.com/jsp/jstl/core"%>

<html>

<head>
<base target="_self">
<title><fmt:message key="colas" /></title>


<link type="text/css" rel="stylesheet" media="screen"
	href="/css/main.css">
<link type="text/css" rel="stylesheet" media="screen"
	href="/css/datatable.css">
<link rel="stylesheet" href="/js/themes/default/default.css" />
<link rel="stylesheet" href="/js/plugins/code/prettify.css" />
<link href="/css/jquery.loadmask.css" rel="stylesheet" type="text/css" />
<link href="/css/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.loadmask.min.js"></script>
<script charset="utf-8" src="/js/jquery.lightbox-0.5.min.js"></script>

</head>

<body>
<div class="clearfix">
<div style="width:800px;padding:10px 50px 20px 0px;">
<c:if test="${not empty commentList}">

    <table id="tdata1" cellspacing="0" cellpadding="0" border="0"
	width="100%">
	<thead>
		<tr>
			<th><fmt:message key="comment.user" /></th>
			<th><fmt:message key="comment.date" /></th>
			<th><fmt:message key="comment" /></th>
		</tr>
	</thead>
	<tbody>
	 <c:forEach items="${commentList}" var="comment">

		<tr>
			<td>${comment.commentUserName}</td>
			<td>${comment.commentDateAsStr }</td>
			<td>${comment.desc }</td>
			</tr>
          </c:forEach>
	</tbody>
</table>

</c:if>

</div>
<div class="request">
<form class="request" action="/process/createComment.tt" method="post"
	id="commentCreateForm">
<input type="hidden" value="${appId }" name="comment.appId"/>	
<table width="100%" cellspacing="2" cellpadding="2">
	<tr>
		<td><label><fmt:message key="comment" /></label></td>
		<td><textarea class="required" value="" name="comment.desc"
			id="desc" tabIndex=0></textarea></td>
			
	</tr>
	<tr>
		<td></td>
		<td><input
	type="submit" class="btn_1 submit"
	value="<fmt:message key="addComment" />" id="reqBtn" name="reqBtn" tabIndex=1></td>
	</tr>
</table>


</form>

</div>
</div>


<script type="text/javascript" src="/js/jquery.dataTables.js"></script>
<script charset="utf-8" src="/js/kindeditor-min.js"></script>
<script charset="utf-8" src="/js/lang/zh_CN.js"></script>
<script charset="utf-8" src="/js/plugins/code/prettify.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript">
$().ready(function() {
	var tdata1 = $('#tdata1').dataTable({
		"bPaginate": false,
		"bFilter": false,
		"bInfo": false,
		"iDisplayLength": 10,
		"aaSorting": [[ 1, "desc" ]],
		"aoColumnDefs": [ 
                         { "bSortable": true, "aTargets": [ 0 ], "sClass": "center_text", "sWidth": "100px" },
                         { "bSortable": true, "aTargets": [ 1 ], "sClass": "center_text", "sWidth": "150px" }
                         ]
	});
	$('.cloas_lightbox').lightBox();				
});	
KindEditor.ready(function(K) {
	if (!window.addEventListener){
	   //IE 该死的IE
	   validator($("#commentCreateForm"));
	}
	var editor1 = K.create('textarea[name="comment.desc"]', {
		allowImageUpload : false,
		items : [
					'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
					'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
					'insertunorderedlist', '|', 'emoticons', 'image','link']
	});
	editor1.focus();
	prettyPrint();
	if (window.addEventListener){
	//FF
		   validator($("#commentCreateForm"));
	}
});

</script>
</body>
</html>
